package com.situ.fly.controller.api;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.situ.fly.service.UserService;

@RestController
@RequestMapping("/api/user/")
public class APIUserController {

	@Autowired
	private UserService userService;
	
	/**
	 * 回帖榜
	 *
	 */
	@PostMapping("/topReply")
	public Object topReply(Integer limit) {
		
		List users = userService.getByReplyNum(limit);
		
		Map<String, Object> result = new HashMap<>();
		result.put("data", users);
		result.put("status", 0);
		
		return result;
	}
}








